package ${element.packagePath!}.${element.beanPackageName!};

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
<#if element.isSwagger == 1>
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
</#if>
<#if element.isLonbok==1>
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
</#if>
import java.io.Serializable;

/**
* <p>
* ${element.notesTable!}
* </p>
*
* @author ${element.author!}
* @since ${element.date!}
*/
<#if element.isLonbok==1>
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
</#if>
<#if element.isSwagger == 1>
@ApiModel(value = "${element.beanCaseName!}", description = "${element.notesTable!}")
</#if>
public class ${element.beanName!}Entity implements Serializable {
<#list  element.queryConditions as query>


    /**
    * ${query.notes!}
    */
 <#if query.isColumnKey == 1>
     @TableId(value = "${query.notes!}", type =  <#if query.idType == 0>IdType.AUTO<#elseif query.idType==1>IdType.INPUT<#else> IdType.ASSIGN_ID </#if>)
 </#if>
  <#if element.isSwagger == 1>
    @ApiModelProperty(value = "${query.notes!}")
  </#if>
    private ${query.fieldType!} ${query.beanField!};

</#list>
<#list  element.queryConditions as query2>

    <#if element.isLonbok==0>
    <#--生成set方法-->
    public ${query2.fieldType!} get${query2.beanCapitalField!}(){
        return ${query2.beanField!};
    }
    </#if>
    <#if element.isLonbok==0>
    <#--生成set方法-->
    public void set${query2.beanCapitalField!}(${query2.fieldType!} ${query2.beanField!}){
        this.${query2.beanField!} = ${query2.beanField!};
    }
    </#if>
</#list>

<#if element.isLonbok==0>
<#--生成toString-->
    @Override
    public String toString() {
        return "${element.beanName!}Entity{" +
        <#list  element.queryConditions as query1>
            "\"${query1.beanField!}\":'" + ${query1.beanField!} + '\''<#if (element.fieldSize != query1_index)>+","</#if>+
        </#list>
        "}";
    }
</#if>

}
